<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/include/common/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>edu01.jsp</title>
</head>
<body>
<%
	request.setCharacterEncoding("UTF-8"); 
	int num1 = Integer.parseInt(request.getParameter("num1"));
	int num2 = Integer.parseInt(request.getParameter("num2"));
	String operator = request.getParameter("operator");
	int result = 0;
	
	if("+".equals(operator)){
		result = num1 + num2;
	}else if("-".equals(operator)){
		result = num1 - num2;
	}else if("*".equals(operator)){
		result = num1 * num2;
	}else if("/".equals(operator)){
		result = num1/ num2;
	}else if("%".equals(operator)){
		result = num1 % num2;
	}
	
	out.write(num1 + operator + num2 + "=" + result);
%>
</body>
</html>